package SparkRDD.RDD算子.Actions

import org.apache.spark.{SparkConf, SparkContext}
import org.junit.Test

class foreachTest {
  val conf = new SparkConf().setMaster("local[6]").setAppName("sortBy")
  val sc   = new SparkContext(conf)

  @Test
  def foreachTest: Unit ={
    val rdd = sc.parallelize(Seq(1,2,3,4,5,6))
    rdd.foreach( item => println(item) )
  }
}
